from django.shortcuts import render_to_response
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse
from django.utils import simplejson
from extremeKanban.config.ressources import get_ext_location

def index(request):
	return render_to_response('kanban/index.html', {'ext_location' : get_ext_location()})

def add_story(request):
	try:
		result = {'success': True}
		title = request.POST['new_story_title']
		description = request.POST['new_story_description']
		print "*" * 50, title, description
		return HttpResponse(simplejson.dumps(result, cls=DjangoJSONEncoder))
	except:
		import traceback
		traceback.print_exc()
